<?php

	$classifies = '[
		{
			"id" : 1,
			"name" : "计算机科学理论"
		},
		{
			"id" : 2,
			"name" : "编程语言"
		},
		{
			"id" : 3,
			"name" : "数据库"
		},
		{
			"id" : 4,
			"name" : "操作系统"
		}
	]';

	$books = '[
	    {
	        "id": 1,
	        "title": "计算机程序的构造和解释(原书第2版)",
	        "price": 33.5,
	        "image": "./image/计算机程序的构造和解释(原书第2版).jpg",
	        "link" : "./book.php?id=1"
	    },
	    {
	        "id": 2,
	        "title": "代码大全(第2版)",
	        "price": 100.37,
	        "image": "./image/代码大全(第2版).jpg",
	        "link" : "./book.php?id=2"
	    },
	    {
	        "id": 3,
	        "title": "程序员修炼之道:从小工到专家",
	        "price": 39.9,
	        "image": "./image/程序员修炼之道从小工到专家.jpg",
	        "link" : "./book.php?id=3"
	    },
	    {
	        "id": 4,
	        "title": "程序员的自我修养:链接、装载与库",
	        "price": 47,
	        "image": "./image/程序员的自我修养链接、装载与库.jpg",
	        "link" : "./book.php?id=4"
	    },
	    {
	        "id": 5,
	        "title": "计算机科学丛书:深入理解计算机系统(原书第2版)",
	        "price": 47,
	        "image": "./image/计算机科学丛书深入理解计算机系统(原书第2版).jpg",
	        "link" : "./book.php?id=5"
	    },
	    {
	        "id": 6,
	        "title": "人月神话",
	        "price": 36.2,
	        "image": "./image/人月神话.jpg",
	        "link" : "./book.php?id=6"
	    }
	]';

	if ($_GET['type'] == 'getClassifies')

		echo ($classifies);

	elseif ($_GET['type'] == 'getBooks')
		
		if ($_GET['classifyId'] == 1)
			echo ($books);
			
?>